<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>04</title>
	</head>
	<body>
		<div class="box" id="box">
			<h4>h4</h4>
		</div>
		<h3>h3</h3>
		<p>000</p>
		<p>001</p>
		<p>002</p>
		<p>003</p>
		<p>004</p>
		
		
		<!--引入jquery包-->
		<script type="text/javascript" src="../js/jquery-3.4.1.js"></script>
		<script type="text/javascript">
			//css2.1选择器
			//$(".box").css("color","red");
			//$("#box").css("color","red");
			//$("div").css("color","red");
			//$("*").css("color","red");
			//$("div.box").css("color","red");
			//$("div.box h4").css("color","red");
			//$("div,h3").css("color","red");
			
			//css3选择器
			//$("p:first").css("color","red");
			//$("p:last").css("color","red");
			//等于符号（从0开始）。eq()也是一个方法
			//$("p:eq(3)").css("color","red");
			//$("p").eq(4).css("color","red");
			//小于符号，大于符号
			//$("p:lt(3)").css("color","red");
			//$("p:gt(2)").css("color","red");
			//奇数，偶数
			//$("p:odd").css("color","red");
			//$("p:even").css("color","red");
			
		</script>
	</body>
</html>
